package com.example.demo.controller;

import com.example.demo.produce.KafkaProducerService;
import org.apache.kafka.common.security.scram.ScramLoginModule;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class TestController {



    @Autowired
    KafkaProducerService kafkaProducerService;


    public static void main(String[] args) {
        System.out.println(ScramLoginModule.class.getName());
    }



    @GetMapping("testSendMessage")
    public Object testSendMessage(){
        kafkaProducerService.sendMessage("test-topic","k1","helowword");
        return "success";
    }



}
